import React from "react";
import { Layout, Menu } from 'antd';
import { connect } from "react-redux";
const { Header, Sider, Content } = Layout;

const Home=({name})=>{
    return(
        <div style={ {height:'100%',color:'red'} }>
            <Layout style={ {height:'100%'} }>
                <Sider>
                    <Menu theme="dark" mode="inline" defaultSelectedKeys={['1']}>
                        <Menu.Item key="1" >
                        nav 1
                        </Menu.Item>
                        <Menu.Item key="2">
                        nav 2
                        </Menu.Item>
                        <Menu.Item key="3" >
                        nav 3
                        </Menu.Item>
                    </Menu>
                </Sider>
                <Layout>
                    <Header>Header</Header>
                    <Content>
                        <div>{name}2</div>
                        <div>44</div>
                    </Content>
                </Layout>
            </Layout>
        </div>
    )
}
const mapStateToProps =state=>{
    return{
        name:state.name
    }
}
export default connect(mapStateToProps)(Home)
